<template>
    <div>
        <h1 class="box1">{{message}}</h1>
        <OneComp></OneComp>
    </div>
</template>

<script>
    import OneComp from "./OneComp";

    export default {
        name: "HelloWorld",
        data() {
            return {
                message: "Hello world"
            }
        },
        components: {
            OneComp
        }
    }
</script>

<!--scoped 只在当前组件有效-->
<style scoped lang="scss">
    $w: 200px;
    $color: red;

    .box1 {
        width: $w;
        height: 300px;
        line-height: 300px;
        padding: 100px;
        color: $color;
        background: blanchedalmond;
        font-size: 20px;
    }
</style>